/**
 * Created by wanghongxiang on 2018/5/21.
 */
import { high } from 'nc-lightapp-front';

const { Refer } = high;
const unitConf = {
    multiLang: {
        domainName: 'uapbd',
        currentLocale: 'zh-CN',
        moduleId: 'refer_uapbd',
    },

    refType: 'tree',
    refName: 'refer-000232', /* 国际化处理： 集团(所有)*/
    placeholder: 'refer-000232', /* 国际化处理： 集团(所有)*/
    refCode: 'uapbd.org.GroupDefaultTreeRef',
    queryTreeUrl: '/nccloud/uapbd/ref/GroupDefaultTreeRef.do',
    treeConfig: {name: ['refer-000002', 'refer-000003'], code: ['refcode', 'refname']}, /* 国际化处理： 编码,名称*/
    rootNode: {refname: 'refer-000232', refpk: 'root'}, /* 国际化处理： 集团(所有)*/
    isMultiSelectedEnabled: false,
    isHasDisabledData: false
};
export default function (props = {}) {
    var conf = { multiLang: { domainName: 'hrhi', currentLocale: 'zh-CN',  moduleId: 'refer6007'},
        refType: 'gridTree',
        refName: 'hi6007-000009',/* 国际化处理： 人员*/
        placeholder: 'hi6007-000009',/* 国际化处理： 人员*/
        refCode: 'hrhi.refer.PsndocGlobalTreeGridRef',
        queryTreeUrl: '/nccloud/hrhi/ref/AdminOrgTreeRef.do',
        queryGridUrl: '/nccloud/hrhi/ref/PsndocAdminGridRef.do',
        rootNode: { refname: 'hi6007-000010', refpk: 'root' ,isleaf: false},/* 国际化处理： 组织部门*/
        columnConfig: [{
            name: [ 'hi6007-000004' , 'hi6007-000005','hi6007-000006','hi6007-000007','hi6007-000008'],/* 国际化处理： 人员编码,姓名,组织,部门,岗位*/
            code: [ 'refcode', 'refname' ,'org_orgs.name','org_dept.name','om_post.postname']
        }],
        isMultiSelectedEnabled: false,
    };
    if(props.isShowUnit){
        conf.unitProps = unitConf;
    }

    return <Refer {...Object.assign(conf, props)} />
}
